zip

infix fun <R> zip(other: Try<R>): Try<Pair<T, R>>

Returns Success containing a Pair of values of this and other if both instances of Try are Success. Otherwise returns first Failure.

Return

Success containing a Pair of values of this and other if both instances of Try are Success. Otherwise returns first Failure.

Since

1.1

Parameters

other

Other Try.

inline fun <T1, R> zip(other: Try<T1>, transform: (T, T1) -> R): Try<R>

Returns Success containing the result of applying transform to both values of this and other if both instances of Try are Success. Otherwise returns first Failure.

Return

Success containing the result of applying transform to both values of this and other if both instances of Try are Success. Otherwise returns first Failure.

Since

1.1

Parameters

other

Other Try.

transform

Function transforming values of both instances of Success.